home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d1 / bnchutil.arc / SEARCH.DOC < prev    next >
Text File  |  1991-04-30  |  2KB  |  41 lines

  1.  
  2. SEARCH                              Michael J. Mefford
  3.  
  4. Purpose:  Searches all or specified directories on a disk for either designated
  5.           filenames or the first occurrence of character strings within files.
  6.  
  7. Format:   SEARCH [filespec] [string][/P][/C][/B]
  8.  
  9. Remarks:  SEARCH defaults to a diskwide search of all subdirectories on the
  10.           current disk.  You can specify a different drive and/or a pathname as
  11.           part of the optional filespec parameter.  Filename searches support
  12.           the DOS * and ? wildcards.  Character strings within files are
  13.           identified by putting them in quotation marks.  (The strings may
  14.           themselves include a pair of quotation marks.)  Pressing either
  15.           Ctrl-Break or Ctrl-C terminates SEARCH manually.
  16.  
  17.           To redirect the output of the SEARCH command to a printer, add /P to
  18.           the command line, as shown in the first example below.  Adding a
  19.           similar /C switch will make the search for a character string
  20.           case-sensitive.
  21.  
  22.           When searching for a character string, SEARCH normally ignores .COM
  23.           and .EXE files.  While this saves time, there may be occasions when
  24.           you want to find copyright notices, error messages, et al. in an
  25.           executable file.  To include binary files in the search, add the /B
  26.           parameter on the command line.
  27.  
  28. Example:  To print out a list all the .COM files in the \PROG subdirectory of
  29.           your current drive, you would enter
  30.  
  31.           SEARCH \PROG\*.COM/P
  32.  
  33. Example:  To find which of the file(s) in your \LETTERS subdirectory contained
  34.           the salutation, Dear Miss Jones, enter
  35.  
  36.           SEARCH \LETTERS "Dear Miss Jones"
  37.  
  38. Notes:    SEARCH returns a line number, based on the number of previous
  39.           carriage returns in the file, when it finds a string.  It reports
  40.           only the first occurrence of the string in each file.
  41.